package cn.itcast.day05.demo06;

public class string {
    public static void main(String[] args) {
        //使用空参构造
        String str1=new  String();
        System.out.println("no1:"+str1);

        //使用字符数组
        char[] array={'a','b','c'};
        String str2=new String(array);
        System.out.println("No2:"+str2);

        //根据字符数组
        byte[] barray={97,98,99};
        String str3=new String(barray);
        System.out.println("no3："+str3);

        System.out.println("s1==s2?"+str1.equals(str2));
        System.out.println("s2==s3?"+str2.equals(str3));
        System.out.println("---------------------");

        System.out.println("s2==s3?"+(str2==str3));
    }
}
